// --------------------------------------------------------------------------------------------
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
// 
// The contents of this file are subject to the Mozilla Public License Version
// 1.1 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
// http://www.mozilla.org/MPL/
// 
// Software distributed under the License is distributed on an "AS IS" basis,
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
// for the specific language governing rights and limitations under the
// License.
// 
// <remarks>
// Generated by IDLImporter from file nsIXSLTProcessor.idl
// 
// You should use these interfaces when you access the COM objects defined in the mentioned
// IDL/IDH file.
// </remarks>
// --------------------------------------------------------------------------------------------
namespace Gecko
{
	using System;
	using System.Runtime.InteropServices;
	using System.Runtime.InteropServices.ComTypes;
	using System.Runtime.CompilerServices;
	
	
	/// <summary>
    ///This Source Code Form is subject to the terms of the Mozilla Public
    /// License, v. 2.0. If a copy of the MPL was not distributed with this
    /// file, You can obtain one at http://mozilla.org/MPL/2.0/. </summary>
	[ComImport()]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	[Guid("4a91aeb3-4100-43ee-a21e-9866268757c5")]
	public interface nsIXSLTProcessor
	{
		
		/// <summary>
        /// Import the stylesheet into this XSLTProcessor for transformations.
        ///
        /// @param style The root-node of a XSLT stylesheet. This can be either
        /// a document node or an element node. If a document node
        /// then the document can contain either a XSLT stylesheet
        /// or a LRE stylesheet.
        /// If the argument is an element node it must be the
        /// xsl:stylesheet (or xsl:transform) element of an XSLT
        /// stylesheet.
        ///
        /// @exception nsIXSLTException
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void ImportStylesheet([MarshalAs(UnmanagedType.Interface)] nsIDOMNode style);
		
		/// <summary>
        /// Transforms the node source applying the stylesheet given by
        /// the importStylesheet() function. The owner document of the output node
        /// owns the returned document fragment.
        ///
        /// @param source The node to be transformed
        /// @param output This document is used to generate the output
        /// @return DocumentFragment The result of the transformation
        ///
        /// @exception nsIXSLTException
        /// </summary>
		[return: MarshalAs(UnmanagedType.Interface)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		nsIDOMDocumentFragment TransformToFragment([MarshalAs(UnmanagedType.Interface)] nsIDOMNode source, [MarshalAs(UnmanagedType.Interface)] nsIDOMDocument output);
		
		/// <summary>
        /// Transforms the node source applying the stylesheet given by the
        /// importStylesheet() function.
        ///
        /// @param source The node to be transformed
        /// @return Document The result of the transformation
        ///
        /// @exception nsIXSLTException
        /// </summary>
		[return: MarshalAs(UnmanagedType.Interface)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		nsIDOMDocument TransformToDocument([MarshalAs(UnmanagedType.Interface)] nsIDOMNode source);
		
		/// <summary>
        /// Sets a parameter to be used in subsequent transformations with this
        /// nsIXSLTProcessor. If the parameter doesn't exist in the stylesheet the
        /// parameter will be ignored.
        ///
        /// @param namespaceURI The namespaceURI of the XSLT parameter
        /// @param localName    The local name of the XSLT parameter
        /// @param value        The new value of the XSLT parameter
        ///
        /// @exception NS_ERROR_ILLEGAL_VALUE The datatype of value is
        /// not supported
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void SetParameter([MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Gecko.CustomMarshalers.AStringMarshaler")] nsAStringBase namespaceURI, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Gecko.CustomMarshalers.AStringMarshaler")] nsAStringBase localName, [MarshalAs(UnmanagedType.Interface)] nsIVariant value);
		
		/// <summary>
        /// Gets a parameter if previously set by setParameter. Returns null
        /// otherwise.
        ///
        /// @param namespaceURI The namespaceURI of the XSLT parameter
        /// @param localName    The local name of the XSLT parameter
        /// @return nsIVariant  The value of the XSLT parameter
        /// </summary>
		[return: MarshalAs(UnmanagedType.Interface)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		nsIVariant GetParameter([MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Gecko.CustomMarshalers.AStringMarshaler")] nsAStringBase namespaceURI, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Gecko.CustomMarshalers.AStringMarshaler")] nsAStringBase localName);
		
		/// <summary>
        /// Removes a parameter, if set. This will make the processor use the
        /// default-value for the parameter as specified in the stylesheet.
        ///
        /// @param namespaceURI The namespaceURI of the XSLT parameter
        /// @param localName    The local name of the XSLT parameter
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void RemoveParameter([MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Gecko.CustomMarshalers.AStringMarshaler")] nsAStringBase namespaceURI, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Gecko.CustomMarshalers.AStringMarshaler")] nsAStringBase localName);
		
		/// <summary>
        /// Removes all set parameters from this nsIXSLTProcessor. This will make
        /// the processor use the default-value for all parameters as specified in
        /// the stylesheet.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void ClearParameters();
		
		/// <summary>
        /// Remove all parameters and stylesheets from this nsIXSLTProcessor.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void Reset();
	}
}
